package com.kugou.game.sdk.adapter;

import java.util.ArrayList;

import com.kugou.framework.v4.Fragment;
import com.kugou.framework.v4.FragmentManager;
import com.kugou.framework.v4.FragmentPagerAdapter;

public class RechargePageAdapter extends FragmentPagerAdapter {

	private ArrayList<Fragment> mFragments;

	/**
	 * 
	 * @param fm
	 */
	public RechargePageAdapter(FragmentManager fm) {
		super(fm);
	}

	public void setFragments(ArrayList<Fragment> fragments) {
		mFragments = fragments;
	}

	@Override
	public Fragment getItem(int position) {
		if (mFragments != null && mFragments.size() > 0 && position >= 0
				&& position < mFragments.size())
			return mFragments.get(position);
		return null;
	}


	@Override
	public int getCount() {
		return mFragments.size();
	}

}
